<?php 
class Work_timeModel extends BaseModel {
	public function add_work_time($data) {
		$result = $this->add($data);
		if($result){
			return true;
		}else{
			return false;
		}
		
	}
	public function select_work_time(){
		$result = $this->where(array('is_del'=>0))->select();
		return $result;

	}
	public function get_work_time($eid) {
		$result = $this->where(array('wid'=>$eid))->find();
		return $result;
		
	}

	public function edit_work_time($eid,$data) {
		$result = $this->where(array('wid'=>$eid))->save($data);
		
		if($result){
			return true;
		}else{
			return false;
		}
		
	}

	public function del_work_time($id){
		$data['is_del']=1;
		$da = $this->where(array('wid'=>$id))->save($data);
		if($da){
			return true;
		}else{
			return false;
		}
	}
	
}
?>